﻿using CefSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chen.CefWebKit.Handler
{
    class CookieHandler : CookieManager
    {
        List<Cookie> cookies;
        public CookieHandler(string path):base(path,false,null)
        {
            cookies = new List<Cookie>();
        }

        public override bool DeleteCookies(string url, string name, IDeleteCookiesCallback callback = null)
        {
            return true;
        }

        public override bool SetCookie(string url, Cookie cookie, ISetCookieCallback callback = null)
        {
            cookies.Add(cookie);
            return true;
        }

        public override bool VisitAllCookies(ICookieVisitor visitor)
        {
            //throw new NotImplementedException();
            return true;
        }

        public override bool VisitUrlCookies(string url, bool includeHttpOnly, ICookieVisitor visitor)
        {
            //throw new NotImplementedException();
            return true;
        }
    }
}
